package jp.lab1;

public class Worker implements Runnable {

	private SecureControlPoint cp;
	private int time;
	
	public Worker(SecureControlPoint cp, int time){
		this.cp = cp;
		this.time = time;
	}
	
	public void run(){
		
		try{
			Thread.sleep(time);
		}catch(Exception e){
			
		}
		
		cp.start();
		cp.search();
		
		
		cp.regist();
		
		//if(!cp.isRegistered()){
		//	System.err.println("Register failed");
		//}
		
		
	}

}
